<template>
  <div>
    <common-return :head="$route.query.sys_name" :path="path"></common-return>
    <van-collapse v-model="activeName" accordion>
      <van-collapse-item title="完成情况" name="1">
        <comp-sum></comp-sum>
      </van-collapse-item>
      <van-collapse-item title="正答率" name="2">
        <prop></prop>
      </van-collapse-item>
      <van-collapse-item title="答题情况" name="3">
        <exam-score></exam-score>
      </van-collapse-item>
      <van-collapse-item title="视频列表" name="4">
        <videos @VideoStatus="VideoChild($event)" :videoStatus="videoStatus"></videos>
      </van-collapse-item>
      <van-collapse-item title="添加视频" name="5">
        <add-viedos @VideoStatus="VideoChild($event)"></add-viedos>
      </van-collapse-item>
      <van-collapse-item title="题目列表" name="6">
        <questions :questStatus="questStatus" :videoStatus="videoStatus"></questions>
      </van-collapse-item>
      <van-collapse-item title="添加题目" name="7">
        <add-questions @QuestStatus="QuestChild($event)" :videoStatus="videoStatus"></add-questions>
      </van-collapse-item>
    </van-collapse>
  </div>
</template>

<script>
  import CommonReturn from "@/components/Common/CommonReturn"
  import CompSum from "../Exam/CompSum";
  import Prop from "../Exam/Prop";
  import ExamScore from "../Exam/ExamScore"
  import Videos from "../Exam/Videos"
  import AddViedos from "../Exam/AddVideos";
  import Questions from "../Exam/Questions"
  import AddQuestions from "../Exam/AddQuestions";
  import {Collapse, CollapseItem} from 'vant';

  export default {
    name: "DocumentExam",
    components: {
      Prop,
      CommonReturn,
      CompSum,
      ExamScore,
      Videos,
      AddViedos,
      Questions,
      AddQuestions,
      [Collapse.name]: Collapse,
      [CollapseItem.name]: CollapseItem,
    },
    data() {
      return {
        activeName: '1',
        path: "/Documents",
        questStatus: "",
        videoStatus: "",
      }
    },
    methods:{
      QuestChild:function(msg){
        let _this = this;
        _this.questStatus = msg;
      },
      VideoChild:function(msg){
        let _this = this;
        _this.videoStatus = msg;
      }
    }
  }
</script>

<style scoped>

</style>
